package com.java3_3;


//创建枚举类的四步
/*
（1）创建枚举类中的属性
（2）私有化构造器
（3）创建孟枚举类对象
（4）使用get方法获得枚举类对象中的属性
* */

//枚举类 -- 固定的对象并且里面数据不可修改

public class MyEnumerate {
    private String name;
    private int month;

    private MyEnumerate(String name, int month) {
        this.name = name;
        this.month = month;
    }

    public static final MyEnumerate SPRING = new MyEnumerate("春天",234);
    public static final MyEnumerate SUMMER = new MyEnumerate("夏天",567);
    public static final MyEnumerate AUTUMN = new MyEnumerate("秋天",8910);
    public static final MyEnumerate WINTER = new MyEnumerate("冬天",11121);

    public String getName() {
        return name;
    }

    public int getMonth() {
        return month;
    }

    @Override
    public String toString() {
        return "MyEnumerate{" +
                "name='" + name + '\'' +
                ", month=" + month +
                '}';
    }
}
